<template>
    <iframe :id="id" :src="url" frameborder="0" width="100%" height="764px" scrolling="auto" style="border-radius: 5px;"></iframe>
</template>

<script>
export default {
    name: 'IframePageContent',
    data () {
        return {
            url: '',
            id: ''
        }
    },
    created () {
        this.goUrl()
    },
    updated () {
        this.goUrl()
    },
    watch: {
        $route (to, from) {
            this.goUrl()
        }
    },
    methods: {
        goUrl () {
            let params = this.$route.params
            let url = params.url
            this.id = this.$route.path
            if (url !== null && url !== undefined) {
                this.url = url
            }
        }
    }
}
</script>

<style>
</style>
